var nian=document.querySelector(".nian");
var woe=document.querySelector("#woe");
var nio=document.querySelector("#nio");
var wu=document.querySelector(".wu");


woe.onclick=function () {
    nian.style.display="block";
    woe.style.width="430px";
    nio.style.display="none";
};
wu.onclick=function () {
    nian.style.display="none";
    woe.style.width="400px";
    nio.style.display="inline-block";
};




var zao=document.querySelector("#zao");
var mkl=document.querySelector(".mkl");
console.log(zao);
console.log(mkl);
zao.onmouseover=function () {
    mkl.style.display="block";
};
zao.onmouseout=function () {
    mkl.style.display="none";
};

var mo=document.querySelector("#mo");
var mi=document.querySelector("#mi");
var mo1=document.querySelector("#mo1");
mo.onclick=function () {
    mi.style.display="block";
    mo.style.display="none";
    mo1.style.display="block";
};
mo1.onclick=function () {
    mi.style.display="none";
    mo1.style.display="none";
    mo.style.display="block";
};


/*


var nia=document.querySelector("#nia");
var mkl1=document.querySelector(".mkl1");
nia.onmouseover=function () {
    mkl1.style.display="block";
};
nia.onmouseout=function () {
    mkl1.style.display="none";
};

*/








/*-----回到顶部的js------*/


var t = document.querySelector("#toTop");
window.onscroll = function () {
    console.log(document.documentElement.scrollTop>1000 || document.body.scrollTop>1000)
    if (document.documentElement.scrollTop>1000 || document.body.scrollTop>1000){
        t.style.display="block";
    }else {
        t.style.display="none";
    }
};

///点击回到顶部
t.addEventListener('click',function () {
    window.scrollTo({
        top:0,
    behavior:'smooth'
    })
});



//鼠标经过的时候显示详细资料
var list = document.querySelectorAll(".niapp .List-item");

for(var i = 0;i<list.length;i++){


    list[i].children[0].children[0].children[0].addEventListener("mouseleave",function(){
        console.log(this.children[1].style.display = "none")
    });

    list[i].children[0].children[0].children[0].addEventListener("mouseenter",function(){
        console.log(this.children[1].style.display = "block")
    });




}




//点击发布input变长


//
// var aop=document.querySelectorAll(".aop");
// var qui=document.querySelectorAll(".qui");
// aop.onclick=function () {
//     qui.style.width="650px";
//     aop.style.display="none";
// };








var swiper = new Swiper('.swiper-container', {
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    },
});

var vm = new Vue({
    el:'#app',
    data:{
        message:'数据连接中...'
    },
    mounted(){
        axios
            .get('new.json')
            .then(response => (this.message = response.data.employees/*这里是json的数据的名字*/))
    .catch(function (error){
            console.log(error);
        });
    }
});
